$('.tab-item').eq(0).addClass('active');


var signinForm = $('#signinForm').validate({
  rules:{
    username: {
      required: true,
      rangelength:[3,8]
    },
    password: {
      required: true,
      minlength: 5
    }
  },
  messages:{
    username: {
      required: "请输入账户",
      rangelength:"用户名长度为3-8个字母"
    },
    password: {
      required: "请输入密码",
      minlength: "密码长度不能小于5个字母"
    }
  },
  errorPlacement: function(error, element) { //错误信息位置设置方法
    element.parent().append('<span class="error-message"></span>');
    error.appendTo(element.parent().find('.error-message'));
  },
})

